package com.epoque.gate.server.rpc;

import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.epoque.security.api.vo.authority.PermissionInfo;
import com.epoque.security.api.vo.user.UserInfo;


/**
 * 
 * @ClassName: IUserService
 * @Description: 用户接口类,调用后台管理平台服务
 * @author qiuxianfeng
 * @date 2018年8月29日
 *
 */
@FeignClient("admin-back")
@RequestMapping("api")
public interface IUserService {
  @RequestMapping(value = "/user/username/{username}", method = RequestMethod.GET)
  public UserInfo getUserByUsername(@PathVariable("username") String username);
  @RequestMapping(value = "/user/un/{username}/permissions", method = RequestMethod.GET)
  public List<PermissionInfo> getPermissionByUsername(@PathVariable("username") String username);
  @RequestMapping(value = "/permissions", method = RequestMethod.GET)
  List<PermissionInfo> getAllPermissionInfo();
}
